package com.pay.controller;

import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping(value = "baiduCity")
public class BaiduCityController {

//    private static final Logger logger = LoggerFactory.getLogger(BaiduCityController.class);
//
//    @Autowired
//    private BaiduCityService baiduCityService;
//    @Autowired
//    private PayforreqService payforreqService;
//
//    @Autowired
//    private PaySincomeforreq paySincomeforreq;
//
//    @ApiOperation(value = "根据省市编码查询指定省市")
//    @ApiImplicitParam(name = "code", value = "省市编码", required = true)
//    @RequestMapping(value = "queryBaiduCityByCode", method = RequestMethod.POST)
//    public Response queryBaiduCityByCode(String code){
//        logger.info("根据省市编码："+code+" 查询指定省市");
//        List<BaiduCity> cityList = baiduCityService.selectBaiduCityByCode(code);
//        return Response.success("success", cityList);
//    }
//
//    @ApiOperation(value = "分页查询各个省市")
//    @ApiImplicitParams({@ApiImplicitParam(name = "pageIndex", value = "分页页码", required = true),
//                        @ApiImplicitParam(name = "page_size", value = "每页显示数", required = true)})
//    @RequestMapping(value = "queryBaiduCityPage", method = RequestMethod.POST)
//    public Response queryBaiduCityPage(String pageIndex,String page_size){
//        logger.info("按照页码"+pageIndex+"以及每页显示 "+page_size+" 分页查询各个省市");
//        return baiduCityService.selectBaiduCityPage(pageIndex, page_size);
//    }
//
//    @ApiOperation(value = "代付")
//    @ApiImplicitParam(name = "orderId", value = "交易订单号", dataType = "String", required = true)
//    @RequestMapping(value = "payforreq", method = RequestMethod.POST)
//    public Response payforreq(String orderId){
//        Map map = new HashMap<>();
//        map.put("orderno", orderId);
////        payforreqService.doRequest(map);
//        return null;
//    }
//
//    @ApiOperation(value = "代收")
//    @ApiImplicitParam(name = "orderId", value = "交易订单号", dataType = "String", required = true)
//    @RequestMapping(value = "sincomeforreq", method = RequestMethod.POST)
//    public Response sincomeforreq(String orderId){
//        Map map = new HashMap<>();
//        map.put("orderno", orderId);
////        paySincomeforreq.doRequest(map);
//        return null;
//    }

}
